package cn.gson.springboot.model.dao.privilegedao;


import cn.gson.springboot.model.pjos.Position;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.jpa.repository.Query;
public interface PositionDao extends CrudRepository<Position, Integer> {
    /**
     * 查询部门下的一级角色
     */

    @Query(value = "select * from position where dept_id=?1 and post_level=?2", nativeQuery = true)
    Position firstPost(Integer deptId,Integer postLevel);

}
